package com.supreme.commonboot.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class BizException extends RuntimeException {
    private String message;
    private int code = 500;

    public BizException(String message) {
        super(message);
        this.message = message;
    }

    public BizException(String message, Throwable throwable) {
        super(message, throwable);
        this.message = message;
    }

    public BizException(String message, int code) {
        super(message);
        this.message = message;
        this.code = code;
    }

    public BizException(String message, int code, Throwable throwable) {
        super(message, throwable);
        this.message = message;
        this.code = code;
    }
}
